package com.loto.graphics;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;


public class CsvFile01 implements CsvFile {

    public final static char SEPARATOR = ';';

    private File file;
    private List<String> lines;
    private List<String[] > data;

    public CsvFile01(File file) throws IOException {
        this.file = file;
        init();
    }

    private void init() throws IOException {
        lines = CsvFileHelper.readFile(file);

        data = new ArrayList<String[] >(lines.size());
        String sep = new Character(SEPARATOR).toString();
        for (String line : lines) {
            String[] oneData = line.split(sep);
            data.add(oneData);
        }
    }

	public File getFile() {
		// TODO Auto-generated method stub
		return this.file;
	}

	public List<String[]> getData() {
		// TODO Auto-generated method stub
		return this.data;
	}

	public List<String> getLines() {
		return lines;
	}

    }
